import 'package:flutter/material.dart';
class Home extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text("Text"), // 标题
        leading: Icon(Icons.menu), // 左侧图标
        actions: [Icon(Icons.settings)],  // 右侧图标数组
        elevation: 0.0,// 去掉阴影
        centerTitle: true, // 标题居中

      ),
      body:TextDemo()
    );
  }
}

class TextDemo extends StatelessWidget {

  @override
  Widget build(BuildContext context) {
    return Column(
      children: [
        Text("Flutter 谷歌开发的一款开源，免费的，基于Dart 语言的移动 UI 框架，Android 上构建高质量的原生应用",
        textDirection: TextDirection.ltr,
        style: TextStyle(
          fontSize: 30,
          color: Colors.red,
          fontWeight: FontWeight.w500,
          fontStyle: FontStyle.italic,
          decoration: TextDecoration.lineThrough,
          decorationColor: Colors.blue,
        ),
          textAlign: TextAlign.left,
          maxLines: 3,
          overflow: TextOverflow.ellipsis,
          textScaleFactor: 1.5,  // 文字放大
        ),
        RichText(text: TextSpan(
            text: "Hello",
            style:TextStyle(
              fontSize: 40,
              color: Colors.red
            ),
          children: [
            TextSpan(
                text: "Flutter",
                style: TextStyle(
                    fontSize: 40,
                    color: Colors.blue
                )
            )
          ]
        ))
      ],
    );
  }
}
